﻿using System;

namespace Quail
{
    public interface ITestShell : IDisposable
    {
        /// <summary>
        /// Creates a new test shell
        /// </summary>
        /// <returns></returns>
        ITestShell CreateNewTestShell(string testname);

        /// <summary>
        /// Gets the ActiveTask
        /// </summary>
        Task ActiveTask { get; }

        /// <summary>
        /// Gets or sets the Shared state for parallel tests
        /// </summary>
        object SharedParallelState { get; set; }

        /// <summary>
        /// Starts the test shell
        /// </summary>
        /// <param name="parentTask">The parent task (NULL)</param>
        void Start(Task parentTask);

        /// <summary>
        /// Gets the name of the test
        /// </summary>
        string TestName { get; }

        /// <summary>
        /// Gets or sets the instance state
        /// </summary>
        object InstanceState { get; set; }

        /// <summary>
        /// Gets the TestSession for the test shell
        /// </summary>
        TestSession TestSession { get; }
    }
}
